package com.test.controller;

import com.test.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

import javax.annotation.Resource;

/**
 * @Author：徐志荣
 * @Date：2023/6/7 下午 7:43
 */
@Controller
public class StudentController4 {

    //@Resource 注入

    @Resource
    private   StudentService studentService;


    public void sayHi(){
        //调用service方法
        studentService.sayHi();
    }
}
